<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <title>维修保养</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/vant.css">
    <link rel="stylesheet" href="../../css/main.css">
    <style>
        .van-tabs__line {
            width: .3rem !important;
        }
    </style>
</head>

<body>
    <div class="app" v-cloak>
        <div class="header-common">
            <div class="flex-x-s header">
                <span class="iconfont goback" @click="back">&#xe66f;</span>
                <div class="search flex-x-s" @click="goPage">
                    <span class="iconfont">&#xe71e;</span>
                    <input type="text" maxlength="20" placeholder="请搜索关键词" readonly>
                </div>
                <div class="search-btn" @click="goPage">搜索</div>
            </div>
            <van-tabs v-model="active" color="#3F8CEC" title-active-color="#3F8CEC" line-height="1px">
                <van-tab title="维修保养"></van-tab>
            </van-tabs>
            <div class="screen-nav flex-x-sa flex-wrap">
                <div class="screen-item flex-x-s" v-for="(item,index) in wxList" :key="index" @click="select(index)">
                    <div>{{item}}</div>
                    <span class="iconfont">&#xe665;</span>
                </div>
            </div>
        </div>
    </div>
    <script src="../../script/api.js"></script>
    <script src="../../script/flexible.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/vue.min.js"></script>
    <script src="../../script/iconfont.js"></script>
    <script src="../../script/vant.min.js"></script>
    <script src="../../script/common.js"></script>

    <script>
        apiready = function () {
            vm = new Vue({
                el: '.app',
                data: {
                    show: false,
                    active: 0,
                    wxList: ['店铺类型', '服务类型', '地区', '距离'],
                },

                mounted() {
                    var header = $api.dom('.header-common');
                    var headerH = $api.fixStatusBar(header);
                    console.log(headerH);
                    api.openFrame({
                        name: 'maintenance_frm',
                        url: 'maintenance_frm.html',
                        rect: {
                            marginTop: headerH + 4,
                            marginBottom: 0,
                            w: 'auto'
                        },
                        pageParam: api.pageParam
                    });
      
                    setBDPageStart("维修保养")
                },
                methods: {
                    back() {
                        setBDPageEnd("维修保养")
                        api.closeWin();
                    },
                    select(index) {
                        api.sendEvent({
                            name: 'showFilterBox',
                            extra: {
                                index: index
                            }
                        });
                    },
                    goPage() {
                        api.openWin({
                            name: 'search_win',
                            url: '../search/search_win.html',
                            bounces: false,
                            pageParam: {
                                isHistory: false,
                                title: 'MAINTENANCE',
                                titlePlus: '维修保养'
                            }
                        });
                    }
                },
            })
            api.addEventListener({
                name: 'keyback'
            }, function (ret, err) {
                setBDPageEnd("维修保养")
                api.closeWin();
            });
        }
    </script>
</body>

</html>